#ifndef _CAMERA_H_
#define _CAMERA_H_

#include "common/common.h"
#include "json/json-usr.h"


namespace iecas_ns
{
    #define INIT_CAMERA_SH_FILE_NAME "shell/init-usb-camera.sh"
    #define DEINIT_CAMERA_SH_FILE_NAME "shell/deinit-usb-camera.sh"

    class CCamera
    {
		public:
			static shared_ptr<CCamera> getInstance();
            CCamera();
			bool init(string srcDev);
            void start(void);
            void loop(void);
            bool deinit(string srcDev);
		private:
			static shared_ptr<CCamera> sm_intancePtr;
            string m_srcDev;
            shared_ptr<CCommon> m_commonPtr;
            shared_ptr<CJsonUsr> m_jsonUsrPtr;
            string pwd_shell;
    };
}

#endif